main(List<String> args) {
  print(sum(20, 30));
  printInfo1("name1");
  printInfo1("name1", 18);
  printInfo1("name1", 18, 1.88);

  print("\n");
  printInfo2("name1");
  printInfo2("name1", age: 18);
  printInfo2("name1", age: 18, height: 1.88);
}

int sum(int num1, int num2) {
  return num1 + num2;
}

//位置可选参数
void printInfo1(String name, [int age, double height]) {
  print("${name} ${age} ${height}");
}

//命名可选参数

void printInfo2(String name, {int age, double height}) {
  print("${name} ${age} ${height}");
}
